package com.city.service.report.impl;

import com.city.domain.report.CtCount;
import com.city.repository.report.CtCountRepository;
import com.city.service.report.CtCountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: 李顺时
 * @Description: 专业部门总体综合评价表
 * @Date: Create in 11:49 2018/9/12
 * @Modified By:
 * */
@Service
public class CtCountServiceImpl implements CtCountService {
    @Autowired
    private CtCountRepository ctCountRepository;


    @Override
    public List<CtCount> findAll() {
        return ctCountRepository.findAll();
    }

    @Override
    public List<CtCount> findByPageAndLimit(Integer page, Integer limt) {
        return ctCountRepository.findByPageAndLimit((page-1)*limt,limt);
    }

    @Override
    public long count() {
        return ctCountRepository.count();
    }

    @Override
    public CtCount findById(int id) {
        return ctCountRepository.findOne(id);
    }

    @Override
    public void save(CtCount ctCount) {
        ctCountRepository.save(ctCount);
    }

    @Override
    public void delete(int id) {
        ctCountRepository.delete(id);
    }
}
